#ifndef BASEPROTOCOL_H
#define BASEPROTOCOL_H

#include <QObject>
#include <QQueue>
#include "DataType/Package.h"
#include "DataType/PortStruct.h"
#include "System/CheckCode.h"
#include "System/DataTypeConver.h"

class BaseProtocol : public QObject
{
    Q_OBJECT
public:
    explicit BaseProtocol(QObject *parent = 0):QObject(parent){}
    virtual ~BaseProtocol(){}
    virtual QList<Package> parseData(QByteArray data) = 0;
    virtual QByteArray generateData(Package package) = 0;

    quint8 protocolType() const
    {
        return m_protocolType;
    }

    void setProtocolType(const quint8 &protocolType)
    {
        m_protocolType = protocolType;
    }

protected:
    quint8 m_protocolType;


};

#endif // BASICPROTOCOL_H

